package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import javax.xml.bind.annotation.XmlTransient;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.ces.knacky.framework.model.AbstractBaseEntity;
import com.ces.knacky.framework.model.IFlaggable;

/** @author Hibernate CodeGenerator */
public class ItemWorkflowStatus extends AbstractBaseEntity implements Serializable, IFlaggable {

    /** persistent field */
    private com.ces.knacky.model.Flag flag;

    /** persistent field */
    private Set itemWorkflowAudits;

    /** persistent field */
    private Set items;

    /** full constructor */
    public ItemWorkflowStatus(String description, com.ces.knacky.model.Flag flag, Set itemWorkflowAudits, Set items) {
        this.description = description;
        this.flag = flag;
        this.itemWorkflowAudits = itemWorkflowAudits;
        this.items = items;
    }

    /** default constructor */
    public ItemWorkflowStatus() {
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    
    public com.ces.knacky.model.Flag getFlag() {
        return this.flag;
    }

    public void setFlag(com.ces.knacky.model.Flag flag) {
        this.flag = flag;
    }

    @XmlTransient
    public Set getItemWorkflowAudits() {
        return this.itemWorkflowAudits;
    }

    public void setItemWorkflowAudits(Set itemWorkflowAudits) {
        this.itemWorkflowAudits = itemWorkflowAudits;
    }

    @XmlTransient
    public Set getItems() {
        return this.items;
    }

    public void setItems(Set items) {
        this.items = items;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof ItemWorkflowStatus) ) return false;
        ItemWorkflowStatus castOther = (ItemWorkflowStatus) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
